*****************************************************
* Mexico Pollfish Survey            				*
* E1 Survey Experiment      				        *
* Ana López García, Sarah Berens & Barry Maydom 	*
* July 2023                                         *
* 		                            				*
* ROBUSTNESS CHECKS                                 *
* Pollfish Mexico Survey Dec 31-Jan2nd 21/22        *
*****************************************************
*CHECK - Set directory

use "Data/Data ready E1.dta", clear 

**********************************************************************************
******5.0 ROBUSTNESS CHECKS - Full sample
***********5.0a. Income effects
***********5.0b. Age effects
******5.1 ROBUSTNESS CHECKS - Return migration
***********5.1a. Income effects
***********5.1b. Age effects
***********5.1c. Economic remittances 
***********5.1d. Origin / destination state - dummies
******5.2 ROBUSTNESS CHECKS - US context
***********5.2a. Excluding observations from California
***********5.2b. Excluding observations from Texas
***********5.2c. Origin and destination region dummies
***********5.2d. Tax structure across US states
***********5.2e. Covid death rates across US states (below vs above the US national mean)
***********5.2f. Incumbent governor across US states (Blue vs Red states)

**************************************
*5.0 ROBUSTNESS CHECKS - Full sample**
**************************************
**************************************
**5.0a. INCOME EFFECTS
**DV: support for higher taxation
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.income_level 
contrast income_level, pveffects nowald
pwcompare income_level, pveffects mcompare(sidak)

anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.income_level i.female i.age_range2 i.education_cat i.income_level i.employed
contrast income_level, pveffects nowald
pwcompare income_level, pveffects mcompare(sidak)

*Interaction contrasts
contrast E1_vign1#r.income_level
contrast E1_vign2#r.income_level

*Simple effects
contrast E1_vign1@income_level
contrast E1_vign2@income_level

*Simple contrasts - tax instrument
contrast g.E1_vign1@1.income_level, nowald pveffects
contrast g.E1_vign1@2.income_level, nowald pveffects
contrast g.E1_vign1@3.income_level, nowald pveffects

*Interaction contrasts - VAT
contrast g1.E1_vign1#r.income_level, asobserved 

*Simple contrasts - tax earmarking
contrast g.E1_vign2@1.income_level, nowald pveffects
contrast g.E1_vign2@2.income_level, nowald pveffects
contrast g.E1_vign2@3.income_level, nowald pveffects

*Interaction contrasts - Health
contrast g1.E1_vign2#r.income_level, asobserved 

*Interaction contrasts - roads
contrast g2.E1_vign2#r.income_level, asobserved 

**************************************
****5.0b. AGE EFFECTS
**DV: support for higher taxation
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.age_range2
contrast age_range2, pveffects nowald
pwcompare age_range2, pveffects mcompare(sidak)

anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.age_range2 i.female i.age_range2 i.education_cat i.income_level i.employed
contrast age_range2, pveffects nowald
pwcompare age_range2, pveffects mcompare(sidak)

*Interaction contrasts
contrast E1_vign1#r.age_range2
contrast E1_vign2#r.age_range2

*Simple effects
contrast E1_vign1@age_range2
contrast E1_vign2@age_range2

*Simple contrasts - tax instrument
contrast g.E1_vign1@1.age_range2, nowald pveffects
contrast g.E1_vign1@2.age_range2, nowald pveffects
contrast g.E1_vign1@3.age_range2, nowald pveffects
contrast g.E1_vign1@4.age_range2, nowald pveffects

*Interaction contrasts - VAT
contrast g1.E1_vign1#r.age_range2, asobserved 

*Simple contrasts - tax earmarking
contrast g.E1_vign2@1.age_range2, nowald pveffects
contrast g.E1_vign2@2.age_range2, nowald pveffects
contrast g.E1_vign2@3.age_range2, nowald pveffects
contrast g.E1_vign2@4.age_range2, nowald pveffects

*Interaction contrasts - Health
contrast g1.E1_vign2#r.age_range2, asobserved 

*Interaction contrasts - roads
contrast g2.E1_vign2#r.age_range2, asobserved 


******************************************
*5.1 ROBUSTNESS CHECKS - Return migrants**
******************************************

**5.1a. INCOME EFFECTS - Return migrants

anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.income_level##i.return 

*Interaction contrasts
contrast E1_vign1#return#r.income_level
contrast E1_vign2#return#r.income_level

*Simple effects
contrast E1_vign1@income_level#return
contrast E1_vign2@income_level#return

*Simple contrasts - tax instrument
contrast g.E1_vign1@1.income_level#return, nowald pveffects
contrast g.E1_vign1@2.income_level#return, nowald pveffects
contrast g.E1_vign1@3.income_level#return, nowald pveffects

*Simple contrasts - tax earmarking
contrast g.E1_vign2@1.income_level#return, nowald pveffects
contrast g.E1_vign2@2.income_level#return, nowald pveffects
contrast g.E1_vign2@3.income_level#return, nowald pveffects

*Interaction contrasts - VAT
contrast g1.E1_vign1#r.income_level#r.return, asobserved

*Interaction contrasts - Health
contrast g1.E1_vign2#r.income_level#r.return, asobserved


*******************************************
**5.1b. AGE EFFECTS - Return migrants

***Age+ Return
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.age_range2##i.return 

*Interaction contrasts
contrast E1_vign1#return#r.age_range2
contrast E1_vign2#return#r.age_range2

*Simple effects
contrast E1_vign1@age_range2#return
contrast E1_vign2@age_range2#return

*Simple contrasts - tax instrument
contrast g.E1_vign1@1.age_range2#return, nowald pveffects
contrast g.E1_vign1@2.age_range2#return, nowald pveffects
contrast g.E1_vign1@3.age_range2#return, nowald pveffects
contrast g.E1_vign1@4.age_range2#return, nowald pveffects

*Simple contrasts - tax earmarking
contrast g.E1_vign2@1.age_range2#return, nowald pveffects
contrast g.E1_vign2@2.age_range2#return, nowald pveffects
contrast g.E1_vign2@3.age_range2#return, nowald pveffects
contrast g.E1_vign2@4.age_range2#return, nowald pveffects

*Interaction contrasts - VAT
contrast g1.E1_vign1#r.return#r.age_range2, asobserved 

*Interaction contrasts - Health
contrast g1.E1_vign2#r.return#r.age_range2, asobserved


********************************************************
*5.1c. RETURN MIGRATION - Economic remittances effects 

*Economic Remittances 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.remittances 

*Interaction contrasts
contrast E1_vign1#r.remittances
contrast E1_vign2#r.remittances

*Simple effects
contrast E1_vign1@remittances
contrast E1_vign2@remittances

*Simple contrasts - tax instrument
contrast g.E1_vign1@0.remittances, nowald pveffects
contrast g.E1_vign1@1.remittances, nowald pveffects

*Simple contrasts - tax earmarking
contrast g.E1_vign2@0.remittances, nowald pveffects
contrast g.E1_vign2@1.remittances, nowald pveffects

*Interaction contrasts - VAT
contrast g1.E1_vign1#r.remittances, asobserved 

*Interaction contrasts - Health
contrast g1.E1_vign2#r.remittances, asobserved 


**************************************************************
*5.1d. RETURN MIGRATION - Origin / destination state - dummies

*Nonmigrant households vs return migrant households + Mexican states 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.return i.state_mx
margins g.E1_vign1##g.E1_vign2@return, contrast(pveffects nowald) post

anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.return i.female i.age_range2 i.education_cat i.income_level i.employed i.state_mx
margins g.E1_vign1##g.E1_vign2@return, contrast(pveffects nowald) post

*Nonmigrant households vs return migrant households + USA states 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.return i.state_usa
margins g.E1_vign1##g.E1_vign2@return, contrast(pveffects nowald) post

anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.return i.female i.age_range2 i.education_cat i.income_level i.employed  i.state_usa
margins g.E1_vign1##g.E1_vign2@return, contrast(pveffects nowald) post

*Nonmigrant households vs return migrant households + USA + Mexican states 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.return i.state_usa i.state_mx
margins g.E1_vign1##g.E1_vign2@return, contrast(pveffects nowald) post

anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.return i.state_usa i.state_mx i.female i.age_range2 i.education_cat i.income_level i.employed 
margins g.E1_vign1##g.E1_vign2@return, contrast(pveffects nowald) post


**************************************
*5.2d.ROBUSTNESS CHECKS - US CONTEXT**
**************************************

**********************************************
*5.2d. EXCLUDING OBSERVATIONS FROM CALIFORNIA 
preserve
drop if (Q4_5 == 1)
*Nonmigrant households vs Medicaid states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.medicaid2
margins g.E1_vign1##g.E1_vign2@medicaid2, contrast(pveffects nowald) post
*Nonmigrant households vs Social Assistance states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.assistance_us
margins g.E1_vign1##g.E1_vign2@assistance_us, contrast(pveffects nowald) post
*Nonmigrant households vs Everify states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.everify
margins g.E1_vign1##g.E1_vign2@everify, contrast(pveffects nowald) post
*Nonmigrant households vs enforcement and nonenforcement states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.police_us
margins g.E1_vign1##g.E1_vign2@police_us, contrast(pveffects nowald) post
restore

******************************************
*5.2d. EXCLUDING OBSERVATIONS FROM TEXAS 
preserve 
drop if (Q4_43 == 1)
*Nonmigrant households vs Medicaid states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.medicaid2
margins g.E1_vign1##g.E1_vign2@medicaid2, contrast(pveffects nowald) post
*Nonmigrant households vs Social Assistance states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.assistance_us
margins g.E1_vign1##g.E1_vign2@assistance_us, contrast(pveffects nowald) post
*Nonmigrant households vs Everify states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.everify
margins g.E1_vign1##g.E1_vign2@everify, contrast(pveffects nowald) post
*Nonmigrant households vs enforcement and nonenforcement states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.police_us
margins g.E1_vign1##g.E1_vign2@police_us, contrast(pveffects nowald) post
restore

***************************************
*5.2d. US CONTEXT AND MX STATE EFFECTS 
*Nonmigrant households vs Medicaid states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.medicaid2 i.state_mx
margins g.E1_vign1##g.E1_vign2@medicaid2, contrast(pveffects nowald) post
*Nonmigrant households vs Social Assistance states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.assistance_us i.state_mx
margins g.E1_vign1##g.E1_vign2@assistance_us, contrast(pveffects nowald) post
*Nonmigrant households vs Everify states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.everify i.state_mx
margins g.E1_vign1##g.E1_vign2@everify, contrast(pveffects nowald) post
*Nonmigrant households vs enforcement and nonenforcement states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.police_us i.state_mx
margins g.E1_vign1##g.E1_vign2@police_us, contrast(pveffects nowald) post

*************************************
*5.2d. TAX STRUCTURE ACROSS US STATES

anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.tax_us 
contrast tax_us, pveffects nowald
pwcompare tax_us, pveffects mcompare(sidak)
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.tax_us i.female i.age_range2 i.education_cat i.income_level i.employed
contrast tax_us, pveffects nowald
pwcompare tax_us, pveffects mcompare(sidak)

*Simple effects
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.tax_us
contrast E1_vign1@tax_us, asobserved
contrast E1_vign2@tax_us, asobserved

*Simple contrasts - tax instrument
contrast g.E1_vign1@0.tax_us, nowald pveffects asobserved
contrast g.E1_vign1@1.tax_us, nowald pveffects asobserved
contrast g.E1_vign1@2.tax_us, nowald pveffects asobserved
contrast g.E1_vign1@3.tax_us, nowald pveffects asobserved

*Simple contrasts - tax earmarking
contrast g.E1_vign2@0.tax_us, nowald pveffects
contrast g.E1_vign2@1.tax_us, nowald pveffects
contrast g.E1_vign2@2.tax_us, nowald pveffects
contrast g.E1_vign2@3.tax_us, nowald pveffects

*Interaction
contrast E1_vign1#r.tax_us, asobserved
contrast E1_vign2#r.tax_us, asobserved

***********************************************************
**5.2d. COVID DEATH RATES (BELOW / ABOVE US NATIONAL MEAN) 

*Nonmigrant households vs Covid death rate states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

*Nonmigrant households vs Covid death rate states + controls
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths i.female i.age_range2 i.education_cat i.income_level i.employed
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

*Nonmigrant households vs Covid death rate states + remittances
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths i.remittances 
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

*Nonmigrant households vs Covid death rate states + emigration 
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths i.emigration
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

*Nonmigrant households vs Covid death rate states + covid
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths i.female i.age_range2 i.education_cat i.income_level i.employed i.covid_infection i.covid_vaccine
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

*Nonmigrant households vs Covid death rate states + Socio economic controls + Informality
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths i.female i.age_range2 i.education_cat i.income_level i.employed i.informal
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

*Nonmigrant households vs Covid death rate states + Socio economic controls + Public insurance
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths i.female i.age_range2 i.education_cat i.income_level i.employed i.publicinsurance
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

*Nonmigrant households vs Covid death rate states + Socio economic controls + public healthcare usage
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.covid_deaths i.female i.age_range2 i.education_cat i.income_level i.employed i.publichealth_usage
margins g.E1_vign1##g.E1_vign2@covid_deaths, contrast(pveffects nowald) post

********************************************
**5.2d. INCUMBENT GOVERNOR IN THE US
*Nonmigrant households vs Republican vs Democrat states
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.republican
margins g.E1_vign1##g.E1_vign2@republican, contrast(pveffects nowald) post

*Nonmigrant households vs Republican vs Democrat states + controls
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.republican i.female i.age_range2 i.education_cat i.income_level i.employed
margins g.E1_vign1##g.E1_vign2@republican, contrast(pveffects nowald) post

*Nonmigrant households vs Republican vs Democrat states + covid
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.republican i.female i.age_range2 i.education_cat i.income_level i.employed i.covid_infection i.covid_vaccine
margins g.E1_vign1##g.E1_vign2@republican, contrast(pveffects nowald) post

*Nonmigrant households vs Republican vs Democrat states + Socio economic controls + Informality
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.republican i.female i.age_range2 i.education_cat i.income_level i.employed i.informal
margins g.E1_vign1##g.E1_vign2@republican, contrast(pveffects nowald) post

*Nonmigrant households vs Republican vs Democrat states + Socio economic controls + Public insurance
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.republican i.female i.age_range2 i.education_cat i.income_level i.employed i.publicinsurance
margins g.E1_vign1##g.E1_vign2@republican, contrast(pveffects nowald) post

*Nonmigrant households vs Republican vs Democrat states + Socio economic controls + public healthcare usage
anova E1_pay_taxes i.E1_vign1##i.E1_vign2##i.republican i.female i.age_range2 i.education_cat i.income_level i.employed i.publichealth_usage
margins g.E1_vign1##g.E1_vign2@republican, contrast(pveffects nowald) post

